package com.wanchuang.shengfubao.view.machines;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;
import com.chad.library.adapter.base.entity.node.NodeFooterImp;

import java.util.List;


public class FirstNode extends BaseExpandNode implements NodeFooterImp {

    private List<BaseNode> childNode;
    private String data;
    private int position;

    public FirstNode(List<BaseNode> childNode, String data, int position) {
        this.childNode = childNode;
        this.data = data;
        this.position = position;
        setExpanded(false);
    }

    public String getData() {
        return data;
    }

    public int getPosition() {
        return position;
    }


    /**
     * 重写此方法，返回子节点
     */
    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        return childNode;
    }

    @org.jetbrains.annotations.Nullable
    @Override
    public BaseNode getFooterNode() {
        return new ThreeNode();
    }
}
